<template>
  <div>
     <!-- 底部部分 -->
    <footer class="footer">
      <span class="todo-count"><strong>{{sum}}</strong>剩余</span>
      <ul class="filters">
        <li>
          <a :class="{selected:type ==='all'}" href="#/" @click="qh('all')">全部</a>
        </li>
        <li>
          <a :class="{selected:type==='active'}" href="#/" @click="qh('active')">进行中</a>
        </li>
        <li>
          <a :class="{selected:type==='completed'}" href="#/" @click="qh('completed')">已完成</a>
        </li>

        <!-- <li>
          <a class="selected" href="#/">全部</a>
        </li>
        <li>
          <a href="#/active">进行中</a>
        </li>
        <li>
          <a href="#/completed">已完成</a>
        </li> -->
      </ul>
      <button class="clear-completed" v-if="yi" @click='delAll'>清除已完成</button>
    </footer>
   </div>
</template>
 
<script>
export default {
  name: "FooterList",
  components: {},
  props: {
    type:{
      type:String,
      required: true
    },
    sum:{
      type:Number,
      required: true,
    },
    yi:{
      type:Boolean,
      required: true
    }
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    //点击切换
    qh(value) {
      this.$emit('qh',value)
      console.log(value);
    },
    delAll() {
      this.$emit('delAll')
    }
  }
};
</script>

<style scoped>
     
</style>